home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / AMT.CMD < prev    next >
Encoding:
Text File  |  1996-02-14  |  1.7 KB  |  105 lines

  1. #    Trumpet Login.cmd for AMT Solutions Group, Inc
  2. #
  3. #trace on
  4. #
  5. # set up some strings for dialling up
  6. #
  7. $number = "383-2250"
  8. $username = "CHANGE THIS"
  9. $password = "CHANGE THIS"
  10. $modemsetup = "&c1&k3"
  11. $prompt = "Home>"
  12. $userprompt = "ogin:"
  13. $passprompt = "word:"
  14. $slipcmd = "slip"
  15. $addrtarg = "Your address is"
  16. $pppcmd = "ppp"
  17.  
  18. %attempts = 10
  19. #
  20. #
  21. #----------------------------------------------------------
  22. #
  23. # initialize modem
  24. #
  25. output "atz"\13
  26. if ! [input 10 OK\n]
  27.   display "Modem is not responding"\n
  28.   abort
  29. end
  30. #
  31. # setup our modem commands
  32. #
  33. output "at"$modemsetup\13
  34. input 10 OK\n
  35. #
  36. # send phone number
  37. #
  38. %n = 0
  39. repeat
  40.   if %n = %attempts
  41.     display "Too many dial attempts"\n
  42.     abort
  43.   end
  44.   output "atdt"$number\13
  45.   %ok = [input 45 CONNECT]
  46.   %n = %n + 1
  47. until %ok
  48. input 10 \n
  49. #
  50. #  wait till it's safe to send because some modem's hang up
  51. #  if you transmit during the connection phase
  52. #
  53. wait 30 dcd
  54. #
  55. # now prod the terminal server
  56. #
  57. #output \13
  58. #
  59. #  wait for the username prompt
  60. #
  61. input 30 $userprompt
  62. output $username\13
  63. #
  64. # and the password
  65. #
  66. input 30 $passprompt
  67. output $password\13\13\13\13
  68. #
  69. # we are now logged in
  70. #
  71. input 60 $prompt
  72. if %ppp
  73.   #
  74.   # jump into ppp mode
  75.   #
  76.   output $pppcmd\13
  77.   #
  78.   input 30 \n
  79.   #
  80.   display "PPP mode selected.  Will try to negotiate IP address."\n
  81.   #
  82. else
  83.   #
  84.   # jump into slip mode
  85.   #
  86.   output $slipcmd\13
  87.   #
  88.   # wait for the address string
  89.   #
  90.   input 30 $addrtarg
  91.   #
  92.   # parse address
  93.   #
  94.   address 30
  95.   input 30 \n
  96.   #
  97.   # we are now connected, logged in and in slip mode.
  98.   #
  99.   display \n
  100.   display Connected.  Your IP address is \i.\n
  101. end
  102. #
  103. # now we are finished.
  104. #
  105.